#include<bits/stdc++.h>
using namespace std;
struct mon{
    long long num,r;
}fl[100010];
bool cmp(mon fl1,mon fl2){
    return fl1.r>=fl2.r;
}
long long n,r1[100010],flx[100010],cnt,tmp;
vector<long long> s[100010];

int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n; cnt=n;
    for(int i=0;i<100010;i++){
        fl[i].num=0; fl[i].r=0;
    }
    for(int i=1;i<=n;i++){
        cin>>r1[i]; tmp=0;
        for(int j=1;j<=n;j++){
            if(fl[j].r==r1[i]){
                tmp=j; fl[j].num++;
            }
        }
        if(tmp==0){
            fl[i].num++;
            fl[i].r=r1[i];
        }
    }
    sort(fl+1,fl+n+1,cmp);
    for(int i=n;i>=2;i--){
        if(fl[i].num>0){
            if(fl[i-1].num>=fl[i].num){
                cnt-=fl[i].num;
                fl[i-1].num+=(fl[i-1].num-fl[i].num);
                fl[i].num=0;
            }
            else{
                cnt-=fl[i-1].num;
                fl[i-1].num+=(fl[i].num-fl[i-1].num);
                fl[i].num=0;
            }
        }
    }
    cout<<cnt; return 0;
}
